package com.dk.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.dk.annotation.EnumValue;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 接口信息实体类
 */
@Data
public class ApiEntity{
    @ExcelProperty("ApiNum(接口编号)")
    @NotNull(message = "ApiNum(接口编号)不能为空")
    @Size(max = 15,message = "ApiNum(接口编号)不得超过15位")
    private String apiNum;

    @ExcelProperty("ApiName(接口名)")
    @NotNull(message = "ApiName(接口名)不能为空")
    @Size(max = 50,message = "ApiName(接口名)不得超过50位")
    private String apiName;

    @ExcelProperty("Protocol(请求协议)")
    @NotNull(message = "Protocol(请求协议)不能为空")
    @EnumValue(strValues = {"HTTP","HTTPS"},message = "Protocol(请求协议)不正确(枚举值:HTTP,HTTPS)")
    private String protocol;

    @ExcelProperty("Method(请求方式)")
    @NotNull(message = "Method(请求方式)不能为空")
    @EnumValue(strValues = {"GET","POST","DELETE","PUT"},message = "Method(请求方式)不正确(枚举值:GET,POST,DELETE,PUT)")
    private String method;

    @ExcelProperty("url(请求地址)")
    @NotNull(message = "url(请求地址)不能为空")
    @Size(max = 1000,message = "url(请求地址)不得超过1000位")
    private String url;


}
